package com.luhuiguo.contacts.client.gin;

import com.google.inject.Singleton;
import com.luhuiguo.contacts.client.AppValidationMessages;
import com.luhuiguo.contacts.client.presenter.ContactsPresenter;
import com.luhuiguo.contacts.client.presenter.EditContactPresenter;
import com.luhuiguo.contacts.client.ui.ContactsView;
import com.luhuiguo.contacts.client.ui.EditContactView;
import com.luhuiguo.gwt.presenter.client.DefaultEventBus;
import com.luhuiguo.gwt.presenter.client.EventBus;
import com.luhuiguo.gwt.presenter.client.gin.AbstractPresenterModule;

/**
 * 
 * @author LuHuiguo
 * @version $Id: Module.java 26 2010-03-20 08:57:08Z luhuiguo@gmail.com $
 */
public class Module extends AbstractPresenterModule {

    @Override
    protected void configure() {
        bind(EventBus.class).to(DefaultEventBus.class).in(Singleton.class);

        bindPresenter(ContactsPresenter.class, ContactsPresenter.Display.class, ContactsView.class);
        bindPresenter(EditContactPresenter.class, EditContactPresenter.Display.class, EditContactView.class);

        bind(AppValidationMessages.class).in(Singleton.class);
    }

}
